# encoding=utf-8
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
from time import sleep
from GeneralService import Login,Dynamic
from Configure import Attribute
class publicdynamic(Login.BaseLogin):
    def test_publicWithPhotoAndText(self):
        '''发布动态--含照片和文字'''
        self.login()
        dr=self.driver
        dr.find_element_by_id(Attribute.pubdynamic_addbutton_id).click()
        dr.find_element_by_id(Attribute.pubdynamic_dynamicText_id).send_keys(u"发布测试照片动态")
        Dynamic.publicDynamicForPhoto(dr)
        dr.find_element_by_id(Attribute.pubdynamic_publicButton_id).click()

    def test_publicWithVideoAndText(self):
        '''发布动态图--含视频和文字'''
        self.login()
        dr = self.driver
        dr.find_element_by_id(Attribute.pubdynamic_addbutton_id).click()
        dr.find_element_by_id(Attribute.pubdynamic_dynamicText_id).send_keys(u"发布测试视频动态")
        Dynamic.publicDynamicForVideo(dr)
        dr.find_element_by_id(Attribute.pubdynamic_publicButton_id).click()